<!DOCTYPE HTML>
<html>
   <head>
   <meta charset="utf-8"></meta>
   <title>WebSocketTest</title>
		 <!-- <script type="text/javascript" src="./socket.io.min.js"></script> -->
		 <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>
      <script type="text/javascript">
	  var aa;
	  var socket;
         function WebSocketTest()
         {
        	 
        	 
              socket = io('ws://localhost:9999/',{
				  transports: ['websocket'],
				  path: '/websocket',
				  reconnection: false,
				  query:{},
				  autoConnect: true
				});
              socket.on('connect', () => {
            	  console.log(socket.id); // 'G5p5...'
            	});
			  socket.on('event', function(data){console.log('data:', data)});
			  socket.on('disconnect', function(){console.log('disconnect...')});
         }
      </script>
		
   </head>
   <body>
   
      <div id="sse">
         <a href="javascript:WebSocketTest()">Run</a>
      </div>
      
   </body>
</html>